<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue2.6.12.js"></script>
</head>
<body>
    <div id="app">
        <div>
            <input type="text" placeholder="请输入" v-model="inpt">
            {{inpt}}
            <div>
                <ul>
                    <li v-for="(item,index) in chan()" :key="index">{{item}}</li>
                </ul>
            </div>
        </div>
    </div>
</body>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            inpt:'',
            lists:['1','2','3','4','5','6','7']
        },
        methods:{
            chan(){
                 console.log(this.lists);
                 return this.lists.filter(item=>item.includes(this.inpt));
            }
        }
    });
</script>
</html>